#ifndef PHYSIC_H
#define PHYSIC_H

#include "DebugDraw.h"

namespace interne
{
    class GameCore;
    class Physic
    {
        public:
            Physic(GameCore*);
            virtual ~Physic();

            virtual void setWorld(b2World*);
            virtual void createPlayer(Entity*);
            virtual void createDynamicBox(Entity*);
            virtual void createStaticBox(Entity*);
            virtual void createVirtual(Entity*);

            void debug();
            void step();

            b2World *world;
        protected:
            virtual void createBox(Entity*, b2BodyDef, sleek::core::math::vector2du);
            virtual void createCircle(Entity*, b2BodyDef, sleek::core::math::vector2du);
        private:
            b2dJson import;
            sleek::core::u32 timespec, current;
            sleek::core::math::timer time_stamp;
            GameCore *core;
    };
}

#endif // PHYSIC_H
